<?php
require_once "config_database.php";
require_once "session.php";
	
$usern = $_POST['username'];
$passw = $_POST['password'];
$f = new session();
$is_login = $f->login($_POST['username'],$_POST['password']);
	
	if($is_login){
		header("Location: ../views/halamandashboard.php");
		exit();
		}else{
			echo"<script>alert('gagal login');</script>";
			echo "<meta http-equiv='refresh' content='0;URL=../views/loginbaru.php'>";
			}
	
?>